package com.dkm.ec.product.repository;

import java.util.List;

import com.dkm.biz.repository.IRepository;
import com.dkm.ec.product.domain.ProductMedia;
import com.dkm.ec.product.persistence.entity.ProductMediaPo;
/**
 * 对象功能:产品媒体 Repository接口
 * 开发公司:SKG.COM
 * 开发人员:颜超敏
 * 创建时间:2014-12-17 17:21:14
 */
public interface ProductMediaRepository extends IRepository<String, ProductMediaPo,ProductMedia>{
	/**
	 * 根据产品ID查询媒体列表
	 * @param prodId
	 * @return
	 */
	public List<ProductMediaPo> findByProdId(String prodId);
	
	/**
	 * 根据产品ID查询媒体主图
	 * @param prodId
	 * @return
	 */
	public ProductMediaPo getMainMediaPoByProdId(String prodId);
	
	/**
	 * 根据产品ID查询媒体主图
	 * @param prodId
	 * @return
	 */
	public ProductMediaPo getMainMediaPoByProdIdAttrOpId(String prodId,String attrOpId);
	
	/**
	 * 根据产品ID查询媒体主图
	 * @param prodId
	 * @return
	 */
	public List<ProductMediaPo> findByProdIdForSale(String prodId,String isGallery,String mediaType,String attrOpId);
	
	
	public ProductMediaPo getSpecialMediaPoByProdId(String prodId);
	public ProductMediaPo getSpecialMediaPoByProdIdAttrOpId(String prodId,String attrOpId) ;

	public List<ProductMediaPo> findSaleByProdId(String prodId);
	
	
	public List<ProductMediaPo> findSpecialMediaPoByProdIdAttrOpId(String prodId,String attrOpId) ;
	public List<ProductMediaPo> findSpecialMediaPoByProdId(String prodId);

	public List<ProductMediaPo> findAllByProdIdAndSpecialValue(String prodId,String specialValue);
	
	public List<ProductMediaPo> findAllVideoByProdId(String prodId);

	public List<ProductMediaPo> findbyProductByColor(String prodEntityId,
			String attrName,String type);
}
